fix: hide invalidInfoBar when transitioning to IDLE state#577
fix: hide invalidInfoBar when transitioning to IDLE state#577andrewtavis merged 3 commits intoscribe-org:mainfrom
Conversation
Signed-off-by: Mounil Kanakhara <mounilkankhara@gmail.com>
Thank you for the pull request! 💙The Scribe-Android team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest that you use the Element client as well as Element X for a mobile app, and definitely join the Note Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible. |
Maintainer ChecklistThe following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)
|
Signed-off-by: Mounil Kanakhara <mounilkankhara@gmail.com>
|
Hey @andrewtavis and @angrezichatterbox, I have fixed the bug, pls take a look and let me know in case of any changes. |
andrewtavis
left a comment
There was a problem hiding this comment.
Checking this with @angrezichatterbox now :)
praise, @Mounil2005: Thanks for the great and quick work here, and also for the tests!
note: I sent along a minor commit to clean up the comments as we like those that are their own line to be complete sentences with punctuation - inline comments don't need punctuation or capitalization of the first letter.
Please let us know if you'd like to work on another issue!
Contributor checklist
[] This pull request is on a separate branch and not the main branch
[] I have tested my code with the
./gradlew lintKotlin detekt testcommand as directed in the testing section of the contributing guideDescription
Fixes a keyboard state management regression where the "Not in Wikidata" / "Not in Wiktionary" info panel persists above the keyboard after the user closes it via the X button.
Root cause:
setupIdleView() in KeyboardUIManager.kt restored keyboardView visibility when returning to IDLE state but never hid invalidInfoBar
, leaving it overlaid on the keyboard permanently and making the X button unresponsive on subsequent presses.
Files changed:
app/src/main/java/be/scri/helpers/ui/KeyboardUIManager.kt
— Added binding.invalidInfoBar.visibility = View.GONE and currentPage = 0 in setupIdleView() to ensure the info panel is fully cleared on every transition to IDLE state.
app/src/test/kotlin/be/scri/helpers/ui/KeyboardUIManagerTest.kt
— Added two regression tests simulating the exact reproduction steps from the issue (for both INVALID and ALREADY_PLURAL
paths, as both show the ⓘ button)
Tested by:
code review + unit tests (Robolectric) added; CI will validate
Related issue:
Closes #575